Repository navigation
fix(output): keep layer commits from landing a focus scroll at once - #973
Open
minhduc17801 wants to merge 1 commit into
Open
minhduc17801 wants to merge 1 commit into
minhduc17801 wants to merge 1 commit into
Conversation
Output::arrangeLayers marked the active workspace for an unanimated arrange on every layer commit, even when the usable area was unchanged. A layer that maps right after a focus change, such as a shell OSD shown when the input method switches with focus, overrode the animated arrange the focus queued, so the scrolling strip jumped to its target in one frame. Re-arrange only when the usable area actually changes.
Contributor
|
The description now contains the required template structure. |
minhduc17801
marked this pull request as ready for review
December 2, 2026 08:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Output::arrangeLayersnow re-arranges the active workspace only when the usable area actually changes. Before, every layer commit queued an unanimated arrange. When a layer surface mapped right after a focus change, that arrange overrode the animated one the focus had queued, and the scrolling strip jumped to its target in one frame.Motivation
With the scrolling layout and fcitx5, moving focus to a window that uses a different input method makes Noctalia show its keyboard-layout OSD within the same frame as the focus change. The strip then skips its scroll animation and lands at once. With that OSD turned off, the scroll animates normally.
Cause: a layer's initial commit calls
arrangeLayersdirectly, andarrangeLayersalways calledmarkArrange(false), even for a layer that reserves nothing.markArrangekeeps the last mark, so the unanimated mark won over the animated arrange from the focus change. The fix moves thatmarkArrange(false)into the branch that already detects a changed usable area (previously used only for the debug log), and resets the tracked area when the output has no effective size so a re-enabled output arranges again.Type of Change
Testing
animation/layer_commit_keeps_scroll: a layer surface makes its initial commit right after a focus scroll is requested, and the strip must still be mid-scroll 40 ms in.layer-clientgains acommit-on-stdinoption that holds the initial commit until a line arrives on stdin. The check runs the output at 10 Hz so the focus request and the commit land in one frame.just check-stress animation/layer_commit_keeps_scroll 32→ 32 failed.just test: 169/169 passed.just check(full suite): the same set of checks fails on my machine with and without this change (their clients never map in this environment), so the change adds no new failures.just lint src/output/output.cpp tests/harness/clients/layer_client.cpp: clean.just format-code: no changes.Manual Coverage
Checklist
SCOPE.md, or its scope was agreed in an issue or on Discord first.CONTRIBUTING.md.just format, or this PR has no C++, shader, or Markdown changes.docs/andexamples/config.toml, or this PR does not change user-facing configuration or behavior.Additional Notes
Reproduced and measured in my native session (Noctalia shell, fcitx5) on the unfixed build: the strip was already at its target 7 ms after the focus change while the OSD mapped, and the same move without an input-method change animated normally. With this build installed in the same session, focus changes that show the keyboard-layout OSD scroll with their animation.